import time
import subprocess
print("启动睡眠2min")
time.sleep(120)
print("开始")
while True:
    print('Starting circle code...')
    process1 = subprocess.Popen(['D:\\python37\\python.exe', 'video_writer.py'])
    time.sleep(600)
    print('Stop circle code...')
    process1.terminate() # 3s后关闭程序de

    print('Starting sleeping code...')
    process2 = subprocess.Popen(['D:\\python37\\python.exe', 'sleep_code.py'])
    time.sleep(600)
    process2.terminate() # 10s后关闭程序
    print('Stop sleeping code...')





